package com.chinairi.mall.dao;

import com.chinairi.mall.controller.viewobject.GoodsInfoVO;
import com.chinairi.mall.model.FourNewGoods;
import com.chinairi.mall.model.GoodsPicture;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinairi.mall.service.modelobject.HomeServiceMO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.stream.Stream;

/**
 * <p>
 * 商品图片 Mapper 接口
 * </p>
 *
 * @author gsl
 * @since 2020-09-05
 */
public interface GoodsPictureMapper extends BaseMapper<GoodsPicture> {

    /**
     * 绑定图片和商品
     *
     * @param goodsPicture
     */
    void updateGoodsId(@Param("goodsPicture") GoodsPicture goodsPicture);

    /**
     * 根据企业id获取商品名称
     * @param csDbid
     * @return
     */
    List<GoodsInfoVO> selectGoodsName(@Param("csDbid") String csDbid );

    /**
     * 批量插入图片
     * @param goodsPictureList
     */
    void batchInsert(@Param("goodsPictureList") List<GoodsPicture> goodsPictureList);

    /**
     * 获取四新商品名称
     * @param csDbId
     * @return
     */
    List<FourNewGoods> selectFourNewName(@Param("csDbid") String csDbId);

    /**
     * 根据服务ID获取服务的图片
     * @param serviceDbIdList
     * @return
     */
    List<GoodsPicture> selectByServiceIdList(@Param("serviceDbIdList") List<String> serviceDbIdList);
}
